<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //padStart()、padEnd()方法可以使得字符串达到固定长度，有两个参数，字符串目标长度和填充内容。
        let str = "kerwin"
        console.log(str.padStart(10, "x")) //xxxxkerwin
        console.log(str.padEnd(10, "x")) //kerwinxxxx
        console.log(str.padStart(5, "x")) //kerwin
        console.log(str.padEnd(5, "x")) //kerwin

        let arr = [1, 2,]
        let obj = {
            name: 'twj'
        }
        function test(a, b,) {
            console.log(a, b)
        }
        test(1, 2,)
    </script>
</body>

</html>